-
Notifications
You must be signed in to change notification settings - Fork 45
Fix envTest topologyRef race condition #569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fmount The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
ebfb56c to
400e34a
Compare
|
/test functional |
2 similar comments
|
/test functional |
|
/test functional |
400e34a to
36ca107
Compare
|
/test functional |
7 similar comments
|
/test functional |
|
/test functional |
|
/test functional |
|
/test functional |
|
/test functional |
|
/test functional |
|
/test functional |
last failure is unrelated as Prow wasn't able to start the job. |
|
/test functional |
3 similar comments
|
/test functional |
|
/test functional |
|
/test functional |
200f72e to
0de0624
Compare
|
/test functional |
2 similar comments
|
/test functional |
|
/test functional |
|
/test functional |
1 similar comment
|
/test functional |
| finalizers := prevTopology.GetFinalizers() | ||
| g.Expect(finalizers).To(BeEmpty()) | ||
| }, timeout, interval).Should(Succeed()) | ||
| }, 20*timeout, interval).Should(Succeed()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the 20x timeout here given that we think we know what is going on? I just wonder if you had added this strictly for testing purposes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey no, I think I simply forgot that value here! Good catch, updating the patch right away!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Done)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is weird, while locally it works after removing the 20 * timeout, in CI it fails.
Before this patch, the "updates topology" envTest was a single block of instructions, but we actually need to check each of them provided that the reconcile loop moves forward and certain conditions are satisfied. This patch attempts to split the Eventually block so that: - Each assertion gets its own retry logic (based on timeout, interval) - Prevents early assertion failures from masking later issues This approach has been applied already to other operators (e.g. Nova) where there are many controllers trying to apply/remove finalizers to the same resource. Signed-off-by: Francesco Pantano <[email protected]>
0de0624 to
c7eb9d4
Compare
|
@fmount: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Before this patch, the
updates topologyenvTestwas a single block of instructions, but, provided that the reconcile loop moves forward and certain conditions are satisfied, we actually need to check each of them.This patch attempts to split the
Eventuallyblock so that:timeout,interval)This approach has been applied already to other operators (e.g.
Nova) where there are many controllers trying to apply/removefinalizersto/from the same resource.